package com.ophiux.cs.application.core;

import com.ophiux.utils.common.StringUtil;

/**
 * 请求DTO基类
 * @author chenh
 *
 */
public abstract class RequestDTO extends DTO {
	private String PAGE_INDEX="1";//第几页
	private String PAGE_NUM="10";//每页数量
	private String ORDER_COLUMN;//排序字段
	private String ORDER_DIR;//排序方式

	/**
	 * 参数合法性验证
	 * true：合法
	 * false：不合法
	 * @return
	 */
	public abstract boolean isParamValid();

	public String getPAGE_INDEX() {
		return PAGE_INDEX;
	}

	public void setPAGE_INDEX(String pAGE_INDEX) {
		if(!StringUtil.isEmpty(pAGE_INDEX)) {
			PAGE_INDEX = pAGE_INDEX;
		}
	}
	
	public String getPAGE_NUM() {
		return PAGE_NUM;
	}
	public void setPAGE_NUM(String pAGE_NUM) {
		if(!StringUtil.isEmpty(pAGE_NUM)) {
			PAGE_NUM = pAGE_NUM;
		}
	}

    public String getORDER_COLUMN() {
        return ORDER_COLUMN;
    }

    public void setORDER_COLUMN(String ORDER_COLUMN) {
        this.ORDER_COLUMN = ORDER_COLUMN;
    }

    public String getORDER_DIR() {
        return ORDER_DIR;
    }

    public void setORDER_DIR(String ORDER_DIR) {
        this.ORDER_DIR = ORDER_DIR;
    }
}
